package audi.a4.control.core;

import java.util.ArrayList;

public class Ecu4Packet extends AbstractAudiA4Packet {

	public Ecu4Packet(double timeStamp,AudiA4CanCode code, int ID,ArrayList<String> data) {
		super(timeStamp, code,ID, data);
	}

	@Override
	public boolean validate(AudiA4CanCode code) {
		return code == AudiA4CanCode.ECU_4;
	}

	@Override
	public void parse(int[] byteData) {
		int [] parsed = new int[8];
		parsed[0] = byteData[2];
		parsed[1] = byteData[7];
		parsed[2] = byteData[0];
		parsed[3] = byteData[1];
		parsed[4] = byteData[3];
		parsed[5] = byteData[4];
		parsed[6] = byteData[5];
		parsed[7] = byteData[6];
		setParsedData(parsed);
	}

}
